package appx.craft.droid;

import java.io.IOException;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import appx.craft.droid.ui.Activity_2140_screen;
import appx.craft.droid.ui.Activity_2143_screen;
import appx.craft.droid.ui.Activity_2145_screen;
import appx.craft.droid.ui.AddItemActivity;
import appx.craft.droid.ui.FeedListingActivity;
import appx.craft.droid.ui.FeedSettingsActivity;
import appx.craft.droid.ui.ProfileSettingsActivity;
import appx.craft.droid.ui.SignInActivity;
import appx.craft.droid.ui.SignUpActivity;
import appx.craft.droid.utils.Log;
import appx.craft.droid.utils.Storage;

public class ChooseActivity extends FragmentActivity implements OnClickListener{
	
	private final String TAG = ChooseActivity.class.getCanonicalName();
	private Button btn_additemscreen;
	private Button btn_sign_up;
	private Button btn_sign_in;
	private Button btn_feed_listing;
	private Button btn_feed_setting;
	private Button btn_profile_setting_screen;
	private Button btn_screen_2314;
	private Button btn_screen_2145;
	private Button btn_screen_2143;
	
	@Override
	protected void onCreate(Bundle saveInstance) {
		super.onCreate(saveInstance);
		Log.d(TAG,"[onCreate ]");
		setContentView(R.layout.activity_choose);
		try {
			Storage.verifyImagePath();
		} catch (IOException e) {
			e.printStackTrace();
		}
		btn_additemscreen = (Button)findViewById(R.id.btn_additemscreen);
		btn_additemscreen.setOnClickListener(this);
		
		btn_sign_up = (Button)findViewById(R.id.btn_sign_up);
		btn_sign_up.setOnClickListener(this);
		btn_sign_in = (Button)findViewById(R.id.btn_sign_in);
		btn_sign_in.setOnClickListener(this);
		
		btn_feed_listing = (Button)findViewById(R.id.btn_feed_listing);
		btn_feed_listing.setOnClickListener(this);
		
		btn_feed_setting = (Button)findViewById(R.id.btn_feed_setting);
		btn_feed_setting.setOnClickListener(this);
		
		btn_profile_setting_screen = (Button)findViewById(R.id.btn_profile_setting_screen);
		btn_profile_setting_screen.setOnClickListener(this);
		
		btn_screen_2314 = (Button)findViewById(R.id.btn_screen_2314);
		btn_screen_2314.setOnClickListener(this);
		
		btn_screen_2145 = (Button)findViewById(R.id.btn_screen_2145);
		btn_screen_2145.setOnClickListener(this);
		
		btn_screen_2143 = (Button)findViewById(R.id.btn_screen_2143);
		btn_screen_2143.setOnClickListener(this);
	}
	
	@Override
	protected void onStart() {
		super.onStart();
		Log.d(TAG,"[onStart ]");
	}
	
	@Override
	protected void onStop() {
		super.onStop();
		Log.d(TAG,"[onStop]");
	}
	
	@Override
	protected void onDestroy() {
		super.onDestroy();
		Log.d(TAG,"[onDestroy]");
	}
	
	@Override
	protected void onPause() {
		super.onPause();
		Log.d(TAG,"[onPause]");
	}

	@Override
	public void onClick(View v) {
		if(v.getId() == R.id.btn_additemscreen){
			startActivity(new Intent(ChooseActivity.this,AddItemActivity.class));
		}else if(v.getId() == R.id.btn_sign_in){
			startActivity(new Intent(ChooseActivity.this,SignInActivity.class));
		}else if(v.getId() == R.id.btn_sign_up){
			startActivity(new Intent(ChooseActivity.this,SignUpActivity.class));
		}else if(v.getId() == R.id.btn_feed_listing){
			startActivity(new Intent(ChooseActivity.this,FeedListingActivity.class));
		}else if(v.getId() == R.id.btn_feed_setting){
			startActivity(new Intent(ChooseActivity.this,FeedSettingsActivity.class));
		}else if(v.getId() == R.id.btn_profile_setting_screen){
			startActivity(new Intent(ChooseActivity.this,ProfileSettingsActivity.class));
		}else if(v.getId() == R.id.btn_screen_2314){
			startActivity(new Intent(ChooseActivity.this,Activity_2140_screen.class));
		}else if(v.getId() == R.id.btn_screen_2145){
			startActivity(new Intent(ChooseActivity.this,Activity_2145_screen.class));
		}else if(v.getId() == R.id.btn_screen_2143){
			startActivity(new Intent(ChooseActivity.this,Activity_2143_screen.class));
		}
	}
}
